home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1993 April
/
CICA MS Windows - April 1993.iso
/
unzipped
/
programr
/
listings
/
ptv2n5
/
ljcodes.bas
< prev
next >
Wrap
BASIC Source File
|
1991-09-09
|
1KB
|
33 lines
Sub Command4_Click () ' "SEND CODES TO PRINTER" BUTTON
Picture1.Print "Sending codes directly to printer,"
Picture1.Print "which had better be LaserJet-II compatible!"
' Constructs LaserJet codes and sends to printer.
' For brevity, this does NOT draw the same pattern
' as the other three procedures.
Screen.MousePointer = 11 ' HOURGLASS CURSOR
Open "PRN" For Output As #1 ' OPEN PRINTER AS FILE
For i = 0 To 600 Step 50 ' PRINT SOME RECTANGLES
' Position to column i, row i...
Print #1, Chr$(27); "*p"; Format$(i); "y"; Format$(i); "X";
' Print a 50 x 100 rectangle with shading depending on i...
Print #1, Chr$(27); "*c50ac100b"; Format$(Int(i / 6)); "g2P";
Next i
Print #1, Chr$(27); "*p700y100X"; ' POSITION PRINT CURSOR
Print #1, "PC Techniques" ' PRINT LABEL
Print #1, Chr$(12); ' FORM FEED
Close #1 ' CLOSE PRINTER
Screen.MousePointer = 0 ' NORMAL CURSOR
End Sub